package com.usefullc.crawler.query;

import com.baomidou.mybatisplus.annotation.TableField;
import com.usefullc.common.enums.QueryExpressTypeEnum;
import com.usefullc.system.query.BaseQuery;
import com.usefullc.system.service.component.extend.UsefulQueryField;
import com.usefullc.system.validator.UsefulPropertyVerify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 爬虫模板查询实体
 *
 * @author: 星空
 * @date: 2022-07-26
 */
@ApiModel
@Data
public class TemplateQuery extends BaseQuery {

//useful_auto_generate_section_start

    @UsefulQueryField()
    @UsefulPropertyVerify(minLen = 1, maxLen = 50)
    @ApiModelProperty(notes = "模板名称")
    private String name;

    @UsefulQueryField()
    @UsefulPropertyVerify(minLen = 2, maxLen = 50)
    @ApiModelProperty(notes = "处理方式")
    private String handlerType;


    //useful_auto_generate_section_end

    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "最后运行状态（0 初始化；1 运行中；2 暂停; 3 完成 ）")
    private Integer status;

    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "模板类型（0 公共，1 私有）")
    private Integer type;


    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "复制模版ID")
    private Long copyTemplateId;


    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "用户")
    private Long userId;

    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "行业")
    private Integer industry;

    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "标签")
    private String tags;

    @UsefulQueryField()
    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "网站域名")
    private String websiteDomain;

    @UsefulQueryField(type = QueryExpressTypeEnum.LIKE,columnName = "websiteDomain")
    @UsefulPropertyVerify(minLen = 1, maxLen = 10)
    @ApiModelProperty(notes = "网站域名")
    private String websiteDomainLike;

    @UsefulQueryField(type = QueryExpressTypeEnum.LIKE,columnName = "name")
    @UsefulPropertyVerify(minLen = 1, maxLen = 20)
    @ApiModelProperty(notes = "模板名称")
    private String nameLike;

    @UsefulQueryField(type = QueryExpressTypeEnum.LIKE,columnName = "tags")
    @UsefulPropertyVerify(minLen = 1, maxLen = 20)
    @ApiModelProperty(notes = "标签")
    private String tagsLike;

}
